package scoutobahn.xml.automaton;
/**
 * The StateManager for the OsmSaxHandler.
 * @author mark
 *
 */
public class StateManager {
    private final OsmItemStreamManager manager;
    /**
     * Constructs a new StateManager with the given OsmItemStreamManager.
     * @param streamManager The OsmItemStreamManager
     */
    public StateManager(final OsmItemStreamManager streamManager) {
        this.manager = streamManager;
    }
    /**
     * Returns the undefined state.
     * @return An undefined state
     */
    public UndefinedState getUndefinedState() {
        return new UndefinedState(this);
    }
    /**
     * Returns the node state.
     * @return A NodeState
     */
    public NodeState getNodeState() {
        return new NodeState(this, this.manager);
    }
    /**
     * Returns the state for an relation element.
     * @return An RelationState
     */
    public RelationState getRelationState() {
        return new RelationState(this, this.manager);
    }
    /**
     * Returns the state for an way element.
     * @return A WayState
     */
    public WayState getWayState() {
        return new WayState(this, this.manager);
    }
}
